package com.shj.model;

import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * (SysUser)实体类
 *
 * @author makejava
 * @since 2020-03-12 12:37:38
 */
@Getter
@Setter
public class SysUser implements Serializable {
    private static final long serialVersionUID = -97633238333616444L;
    
    private int id;
    /**
    * 用户编号
    */
    @NotNull(message = "用户编号不能为空")
    private String userId;
    /**
    * 用户姓名
    */
    @NotNull(message = "用户姓名不能为空")
    private String username;
    /**
    * 密码
    */
    private String password;
    /**
    * 联系电话
    */
    @NotNull(message = "联系电话不能为空")
    private String telephone;
    /**
     * 状态:0-正常  1-禁用
     */
    private String status;
    /**
     * 用户拥有角色
     */
    private List<SysUserRole> roles;
    /**
     * 用户接收前端的用户选择的角色
     */
    private List<String> checkList;

    @Override
    public String toString() {
        return "SysUser{" +
                "id=" + id +
                ", userId='" + userId + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", telephone='" + telephone + '\'' +
                ", status='" + status + '\'' +
                '}';
    }
}